package com.ls.fw.data.search.impl.es.support;

import java.io.Serializable;

import org.springframework.data.elasticsearch.core.ElasticsearchOperations;
import org.springframework.data.elasticsearch.repository.support.AbstractElasticsearchRepository;
import org.springframework.data.elasticsearch.repository.support.ElasticsearchEntityInformation;

/**
 * Elasticsearch specific repository implementation. Likely to be used as target within
 * {@link ElasticsearchRepositoryFactory}
 *
 */
public class MyElasticsearchRepository<M,PK extends Serializable> extends AbstractElasticsearchRepository<M, PK> {

	public MyElasticsearchRepository() {
		super();
	}

	public MyElasticsearchRepository(ElasticsearchEntityInformation<M, PK> metadata,
										 ElasticsearchOperations elasticsearchOperations) {
		super(metadata, elasticsearchOperations);
	}

	public MyElasticsearchRepository(ElasticsearchOperations elasticsearchOperations) {
		super(elasticsearchOperations);
	}
//
//	@Override
//	protected String stringIdRepresentation(String id) {
//		return id;
//	}

	@Override
	protected String stringIdRepresentation(PK arg0) {
		return arg0.toString();
	}
	
}
